<template>
    <div class="home">
        <van-nav-bar
                title="开票信息"
                left-text="返回"
                left-arrow
                border
                fixed
                @click-left="$router.go(-1)"
        />
        <div style="height:50px"></div>
        <div class="title">
            开票信息
        </div>
        <div class="info-line">
            <div>是否允许后付款</div>
            <div>{{info.lag_pay==0?'否':'是'}}</div>
        </div>
        <div class="info-line">
            <div>付款方式</div>
            <div>{{info.payment_type==1?'公对公付款':'个人转账'}}</div>
        </div>
        <div class="info-line">
            <div>发票类型</div>
            <div>{{info.invoice_type_text}}</div>
        </div>
        <div class="info-line">
            <div>开票类型</div>
            <div>{{info.invoice_class_text}}</div>
        </div>
        <div class="info-line">
            <div>发票名称</div>
            <div>{{info.invoice_name}}</div>
        </div>
        <div class="info-line">
            <div>公司名称</div>
            <div>{{info.invoice_company}}</div>
        </div>
        <div class="info-line">
            <div>税号</div>
            <div>{{info.invoice_tax_code}}</div>
        </div>
        <div class="info-line">
            <div>公司地址</div>
            <div>{{info.invoice_address}}</div>
        </div>
        <div class="info-line">
            <div>公司联系电话</div>
            <div>{{info.invoice_mobile}}</div>
        </div>
        <div class="info-line">
            <div>开户行</div>
            <div>{{info.invoice_bank}}</div>
        </div>
        <div class="info-line">
            <div>开户账号</div>
            <div>{{info.invoice_bank_code}}</div>
        </div>
        <div class="info-line">
            <div>是否见票付款</div>
            <div>{{info.invoice_pay_text==0?'否':'是'}}</div>
        </div>
        <div style="height: 10vh;"></div>
    </div>
</template>

<script>
    // @ is an alias to /src
    import headerItem from '@/components/header.vue'

    export default {
        name: "jrFinancialBillingInfo",
        data() {
            return {
                info: '',
            };
        },
        components: {
            headerItem
        },
        methods: {
            getOrderInfo() {
                let params = {
                    token: localStorage.getItem('token'),
                    wx_member_id: localStorage.getItem('wx_member_id'),
                };
                this.$post("/api/finance/invoice", params)
                    .then(res => {
                        this.info = res.data
                    }).catch(err => {
                });
            },
        },
        created() {
            this.getOrderInfo()
        },

    }
</script>
<style scoped lang="less">
    .info-line {
        border-bottom: 1px solid #eee;
        margin: 0 16px;
        padding: 13px 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 16px;

        > div:nth-of-type(1) {
            width: 35vw;
            color: #777777;
        }

        > div:nth-of-type(2) {
            flex: 1;
            color: #333;
        }
    }

    .border-last:last-child {
        border: none;
    }
</style>
